
<?php

class InfoForm extends sfForm
{
  protected static $gender = array('Male', 'Female');
  protected static $role = array('Non','Dean', 'Head');
  
 
  public function configure()
  {
    $this->setWidgets(array(
      'email'   => new sfWidgetFormInputText(),
      'gender' => new sfWidgetFormSelect(array('choices' => self::$gender)),
      'special role' => new sfWidgetFormSelect(array('choices' => self::$role)),));

    $this->widgetSchema->setNameFormat('contact[%s]');
 
    $this->setValidators(array(
      'email'   => new sfValidatorEmail(),
      'gender' => new sfValidatorChoice(array('choices' => array_keys(self::$gender))),
      'special role' => new sfValidatorChoice(array('choices' => array_keys(self::$role))),));
  }


}